using Pisces;
using Unity.VisualScripting;
using UnityEngine;

public class GameLoop : MonoBehaviour
{
    /**
     * 游戏主逻辑
     */
    private GameMain gameMain;
    
    // Start is called before the first frame update
    void Start()
    {
        gameMain.onStart();
    }

    private void Awake()
    {
        gameMain = new GameMain();
        gameMain.onAwake();
    }

    // Update is called once per frame
    void Update()
    {
        gameMain.onUpdate(Time.deltaTime);
    }

    private void FixedUpdate()
    {
        gameMain.onFixedUpdate(Time.fixedDeltaTime);
    }

    private void LateUpdate()
    {
        gameMain.onLateUpdate();
    }

    private void OnDestroy()
    {
        gameMain.onDestroy();
    }
    
}
